package com.meilai.project.mapper.business.sale;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.meilai.project.entity.business.sale.BillSaleMediaAmount;
import com.meilai.project.vo.business.sale.BillSaleMediaAmountVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xchen
 * @since 2022-03-19
 */
@Mapper
public interface BillSaleMediaAmountMapper extends BaseMapper<BillSaleMediaAmount> {

	@Delete("delete from bill_sale_media_amount where bill_sale_id = #{bill_sale_id} ")
	Integer deleteByBillSaleId(@Param("bill_sale_id") Long bill_sale_id);

	@Select("select * from bill_sale_media_amount where bill_sale_id = #{bill_sale_id} ")
	List<BillSaleMediaAmountVO> selectByBillSaleId(@Param("bill_sale_id") Long bill_sale_id);

	List<BillSaleMediaAmountVO> selectByBillSaleIds(@Param("bill_sale_ids") List<Long> bill_sale_ids);
}
